import request from '@/utils/request'





/**
 *  let data ={
      'grant_type':"password",  // 
      'username':"admin",
      'password':"1234qwer",
    };
 * @param {*} data 
 * @returns 
 */

export function login(data) {
  return request({
    url: '/reslogin/oauth/token',
    method: 'post',
    params: data,
    headers: { 'Authorization': 'Basic eGlhb3NoaToxMjM0NTY=' }
  })
}
// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/reslogin/user',
    method: 'get'
  })
}


export function get(url, pram) {
  return request({
    url: url,
    method: 'get',
    params: pram
  })
}

export function post(url, data) {
  return request({
    url: url,
    method: 'post',
    data
  })
}